1 Sample Metadata

treatment age_group patient_id sample Sequence
0 2 3 160008699_3_0_S5 1
1 2 3 160008699_3_8_S6 2
0 2 4 290001824_4_0_S7 3
1 2 4 290001824_4_8_S8 4
0 1 17 330001842_17_0_S31 5
1 1 17 330001842_17_8_S32 6
0 0 5 470009458_5_0_S9 7
1 0 5 470009458_5_4_S10 8
0 1 13 660009823_13_0_S25 9
1 1 13 660009823_13_8_S26 10
0 0 11 770004766_11_0_S21 11
1 0 11 770004766_11_8_S22 12
0 1 2 830001304_2_0_S3 13
1 1 2 830001304_2_4_S4 14
0 2 12 830002078_12_0_S23 15
1 2 12 830002078_12_8_S24 16
0 2 9 880001252_9_0_S17 17
1 2 9 880001252_9_8_S18 18
0 0 8 940004357_8_0_S15 19
1 0 8 940004357_8_8_S16 20
0 1 7 970002731_7_0_S13 21
1 1 7 970002731_7_4_S14 22
0 0 10 980007758_10_0_S19 23
1 0 10 980007758_10_8_S20 24

2 WGCNA result

Soft threshold = 16

soft threshold = 16

.

Modules = 29

29 modules in total

.

Positive modules Spearman correlation (p-value)
lightgreen (152 genes) 0.14 (0.1)
Negative modules Spearman correlation (p-value)
darkred (63 genes) -0.12 (0.2)
midnightblue (303 genes) -0.1 (0.2)

3 Run LASSO on treatment-positive modules (Module lightgreen: 152 genes)

  • Alpha = 1

  • Nested cross validation

    • outer loop method: leave-one-out
    • inner loop method: leave-one-out
## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold
## Tuned lambda value:
##  0.04302683
## 
## Call:  cv.glmnet(x = x, y = y, weights = ..2, foldid = foldid, alpha = tail(alphaSet,      1), family = ..1, penalty.factor = ..3) 
## 
## Measure: Binomial Deviance 
## 
##      Lambda Index Measure     SE Nonzero
## min 0.04303    41   1.042 0.2130      10
## 1se 0.08645    26   1.244 0.1541       7
## Non-zero Coefficients:
##  ENSG00000152894 ENSG00000084072 ENSG00000101057 ENSG00000173898 ENSG00000026559 ENSG00000058091 ENSG00000134532 ENSG00000112232 ENSG00000166833 ENSG00000168502

3.1 List of genes with non-zero coefficients (10 Genes)

ensembl_gene_id external_gene_name
ENSG00000026559 KCNG1
ENSG00000058091 CDK14
ENSG00000084072 PPIE
ENSG00000101057 MYBL2
ENSG00000112232 KHDRBS2
ENSG00000134532 SOX5
ENSG00000152894 PTPRK
ENSG00000166833 NAV2
ENSG00000168502 MTCL1
ENSG00000173898 SPTBN2

3.2 AUC

3.3 Accuracy

##          Reference
## Predicted  0  1
##         0 10  3
##         1  2  9
##               AUC          Accuracy Balanced accuracy 
##         0.7708333         0.7916667         0.7916667

3.4 TPM (pre-treatment (front) vs. post-treatment (back))

##         160008699_3_0_S5 160008699_3_8_S6 290001824_4_0_S7 290001824_4_8_S8
## KCNG1               0.65             0.94             0.89             1.28
## CDK14               6.49             5.21             7.49             8.77
## PPIE               21.15            16.44            17.39            17.77
## MYBL2               1.22             1.04             0.89             2.54
## KHDRBS2             0.52             0.46             0.31             0.48
## SOX5                0.04             0.17             1.80             0.37
## PTPRK               0.74             1.37             0.58             2.68
## NAV2                0.71             0.63             0.47             0.87
## MTCL1               0.30             0.44             0.48             0.34
## SPTBN2              0.65             0.05             0.36             0.19
##         330001842_17_0_S31 330001842_17_8_S32 470009458_5_0_S9
## KCNG1                 0.51               0.93             0.55
## CDK14                 3.21               5.54             4.61
## PPIE                 12.59              10.86            11.87
## MYBL2                 1.86               1.99             1.61
## KHDRBS2               0.38               0.41             0.25
## SOX5                  0.63               0.36             1.62
## PTPRK                 1.01               2.35             1.07
## NAV2                  0.35               0.23             0.88
## MTCL1                 0.41               0.43             0.32
## SPTBN2                0.24               0.09             0.27
##         470009458_5_4_S10 660009823_13_0_S25 660009823_13_8_S26
## KCNG1                1.03               0.22               0.13
## CDK14                5.35               3.87               8.58
## PPIE                12.52              12.76               5.29
## MYBL2                1.90               2.09               0.76
## KHDRBS2              0.27               0.30               0.20
## SOX5                 2.58               0.89               0.19
## PTPRK                3.05               0.91               1.00
## NAV2                 0.27               0.73               0.27
## MTCL1                0.27               0.23               0.31
## SPTBN2               0.21               0.20               0.28
##         770004766_11_0_S21 770004766_11_8_S22 830001304_2_0_S3 830001304_2_4_S4
## KCNG1                 0.13               0.26             0.14             0.37
## CDK14                 3.58               6.32             7.03            10.43
## PPIE                  7.84               9.87            18.19            14.59
## MYBL2                 0.80               1.07             1.46             0.99
## KHDRBS2               0.10               0.15             0.37             0.34
## SOX5                  0.11               0.34             2.10             0.97
## PTPRK                 0.44               0.76             1.95             2.48
## NAV2                  0.06               0.05             1.10             0.65
## MTCL1                 0.28               0.14             0.78             0.32
## SPTBN2                0.01               0.10             0.41             0.13
##         830002078_12_0_S23 830002078_12_8_S24 880001252_9_0_S17
## KCNG1                 0.32               0.30              0.29
## CDK14                 2.71               2.10              7.50
## PPIE                 10.75               7.85             18.17
## MYBL2                 1.09               0.16              0.95
## KHDRBS2               0.13               0.71              0.48
## SOX5                  0.43               0.11              1.28
## PTPRK                 0.60               0.59              1.38
## NAV2                  0.51               0.26              0.29
## MTCL1                 0.45               0.20              0.35
## SPTBN2                0.70               0.03              1.61
##         880001252_9_8_S18 940004357_8_0_S15 940004357_8_8_S16 970002731_7_0_S13
## KCNG1                0.48              0.09              0.60              0.22
## CDK14                5.82              3.65              6.42              5.13
## PPIE                11.21             13.71              8.37             10.27
## MYBL2                0.77              0.77              0.85              3.31
## KHDRBS2              0.36              0.16              0.40              0.19
## SOX5                 0.53              0.42              0.71              0.30
## PTPRK                1.72              0.93              1.78              0.51
## NAV2                 0.07              1.05              1.44              0.46
## MTCL1                0.26              0.16              0.37              0.28
## SPTBN2               0.19              0.07              0.36              0.11
##         970002731_7_4_S14 980007758_10_0_S19 980007758_10_8_S20
## KCNG1                1.09               1.01               1.19
## CDK14                6.11               5.42               6.72
## PPIE                 9.80              16.09              12.64
## MYBL2                0.28               4.64               4.22
## KHDRBS2              0.75               0.39               0.58
## SOX5                 0.28               0.58               0.70
## PTPRK                1.39               1.50               2.82
## NAV2                 0.25               0.31               0.28
## MTCL1                0.59               0.32               0.44
## SPTBN2               0.69               0.44               0.06

3.5 Heatmap (Pre-treatment vs Post-treatment)

3.6 Heatmap for Log-FoldChange for each patient

## Warning: Setting row names on a tibble is deprecated.
## Setting row names on a tibble is deprecated.

4 Run LASSO on treatment-negative modules (Module darkred: 63 genes)

  • Alpha = 1

  • Nested cross validation

    • outer loop method: leave-one-out
    • inner loop method: k-fold; k = 4
    • Didn’t find any non-zero coeffients when using leave-one-out for inner loop
## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground
## Tuned lambda value:
##  0.1464232
## 
## Call:  cv.glmnet(x = x, y = y, weights = ..2, foldid = foldid, alpha = tail(alphaSet,      1), family = ..1, penalty.factor = ..3) 
## 
## Measure: Binomial Deviance 
## 
##     Lambda Index Measure      SE Nonzero
## min 0.1464    10   1.515 0.12399       4
## 1se 0.2225     1   1.524 0.07232       0
## Non-zero Coefficients:
##  ENSG00000279982 ENSG00000271550 ENSG00000272502 ENSG00000169519

4.1 AUC

4.2 Accuracy

##    
##      0  1
##   0 12  0
##   1  0 12
##       Accuracy          Kappa  AccuracyLower  AccuracyUpper   AccuracyNull 
##   1.000000e+00   1.000000e+00   8.575264e-01   1.000000e+00   5.000000e-01 
## AccuracyPValue  McnemarPValue 
##   5.960464e-08            NaN

4.3 List of genes with non-zero coefficients (4 genes)

ensembl_gene_id external_gene_name
ENSG00000169519 METTL15
ENSG00000271550 BNIP3P11
ENSG00000272502 ENSG00000272502
ENSG00000279982 ENSG00000279982

4.4 TPM (pre-treatment (front) vs. post-treatment (back))

##                 160008699_3_0_S5 160008699_3_8_S6 290001824_4_0_S7
## METTL15                     5.35             2.49             3.64
## BNIP3P11                    2.31             0.57             2.81
## ENSG00000272502             0.69             1.36             2.28
## ENSG00000279982             0.17             0.13             0.25
##                 290001824_4_8_S8 330001842_17_0_S31 330001842_17_8_S32
## METTL15                     3.16               1.91               2.29
## BNIP3P11                    2.88               1.74               0.88
## ENSG00000272502             1.16               0.76               0.26
## ENSG00000279982             0.29               0.17               0.16
##                 470009458_5_0_S9 470009458_5_4_S10 660009823_13_0_S25
## METTL15                     1.98              1.63               3.71
## BNIP3P11                    0.84              0.55               3.26
## ENSG00000272502             1.03              0.45               0.74
## ENSG00000279982             0.11              0.12               0.58
##                 660009823_13_8_S26 770004766_11_0_S21 770004766_11_8_S22
## METTL15                       0.76               1.05               1.83
## BNIP3P11                      0.38               0.54               0.91
## ENSG00000272502               0.38               0.37               0.68
## ENSG00000279982               0.06               0.06               0.05
##                 830001304_2_0_S3 830001304_2_4_S4 830002078_12_0_S23
## METTL15                     4.07             2.69               2.33
## BNIP3P11                    2.34             1.15               1.56
## ENSG00000272502             1.43             0.58               0.70
## ENSG00000279982             0.33             0.21               0.28
##                 830002078_12_8_S24 880001252_9_0_S17 880001252_9_8_S18
## METTL15                       2.01              3.53              2.06
## BNIP3P11                      1.27              3.41              0.89
## ENSG00000272502               0.65              1.53              0.54
## ENSG00000279982               0.12              0.38              0.15
##                 940004357_8_0_S15 940004357_8_8_S16 970002731_7_0_S13
## METTL15                      1.91              1.64               2.7
## BNIP3P11                     1.01              0.69               1.1
## ENSG00000272502              0.76              0.45               0.4
## ENSG00000279982              0.18              0.23               0.2
##                 970002731_7_4_S14 980007758_10_0_S19 980007758_10_8_S20
## METTL15                      1.61               2.80               2.05
## BNIP3P11                     1.43               2.17               2.32
## ENSG00000272502              0.45               1.29               0.75
## ENSG00000279982              0.10               0.28               0.14

4.5 Heatmap (Pre-treatment vs Post-treatment)

4.6 Heatmap for Log-FoldChange for each patient

## Warning: Setting row names on a tibble is deprecated.
## Setting row names on a tibble is deprecated.

5 Run LASSO on treatment-negative module (Module midnightblue: 303 genes)

  • Alpha = 1

  • Nested cross validation

    • outer loop method: leave-one-out
    • inner loop method: k-fold; k = 4
    • Didn’t find any non-zero coeffients when using leave-one-out for inner loop
## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground

## Warning in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, : one
## multinomial or binomial class has fewer than 8 observations; dangerous ground
## Tuned lambda value:
##  0.2217997
## 
## Call:  cv.glmnet(x = x, y = y, weights = ..2, foldid = foldid, alpha = tail(alphaSet,      1), family = ..1, penalty.factor = ..3) 
## 
## Measure: Binomial Deviance 
## 
##     Lambda Index Measure      SE Nonzero
## min 0.2218     2   1.509 0.09580       1
## 1se 0.2324     1   1.509 0.09087       0
## Non-zero Coefficients:
##  ENSG00000186073

5.1 AUC

5.2 Accuracy

##    
##      0  1
##   0 12  0
##   1  0 12
##       Accuracy          Kappa  AccuracyLower  AccuracyUpper   AccuracyNull 
##   1.000000e+00   1.000000e+00   8.575264e-01   1.000000e+00   5.000000e-01 
## AccuracyPValue  McnemarPValue 
##   5.960464e-08            NaN

5.3 List of genes with non-zero coefficients (1 gene)

ensembl_gene_id external_gene_name
ENSG00000186073 CDIN1

5.4 TPM (pre-treatment (front) vs. post-treatment (back))

##       160008699_3_0_S5 160008699_3_8_S6 290001824_4_0_S7 290001824_4_8_S8
## CDIN1             1.14             1.35             2.48             1.72
##       330001842_17_0_S31 330001842_17_8_S32 470009458_5_0_S9 470009458_5_4_S10
## CDIN1               1.36               1.58             1.04              0.96
##       660009823_13_0_S25 660009823_13_8_S26 770004766_11_0_S21
## CDIN1               1.94               0.58               0.74
##       770004766_11_8_S22 830001304_2_0_S3 830001304_2_4_S4 830002078_12_0_S23
## CDIN1               0.52             2.13             1.61               1.24
##       830002078_12_8_S24 880001252_9_0_S17 880001252_9_8_S18 940004357_8_0_S15
## CDIN1               0.81              1.95              0.77              1.05
##       940004357_8_8_S16 970002731_7_0_S13 970002731_7_4_S14 980007758_10_0_S19
## CDIN1              0.72              1.43              0.83               1.74
##       980007758_10_8_S20
## CDIN1               1.15

5.5 Heatmap (Pre-treatment vs Post-treatment)

5.6 Heatmap for Log-FoldChange for each patient

## Warning: Setting row names on a tibble is deprecated.
## Setting row names on a tibble is deprecated.

6 Final model

6.1 Final Lasso nested cv (Total 15 genes)

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold

## Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per
## fold
## Tuned lambda value:
##  0.02243423
## 
## Call:  cv.glmnet(x = x, y = y, weights = ..2, foldid = foldid, alpha = tail(alphaSet,      1), family = ..1, penalty.factor = ..3) 
## 
## Measure: Binomial Deviance 
## 
##      Lambda Index Measure     SE Nonzero
## min 0.02243    28  0.9762 0.3644      10
## 1se 0.19064     5  1.2901 0.0605       2
## Non-zero Coefficients:
##  ENSG00000152894 ENSG00000186073 ENSG00000112232 ENSG00000173898 ENSG00000058091 ENSG00000084072 ENSG00000166833 ENSG00000101057 ENSG00000271550 ENSG00000134532

6.1.1 AUC

6.1.2 Accuracy of nested cv

##          Reference
## Predicted  0  1
##         0 10  3
##         1  2  9
##               AUC          Accuracy Balanced accuracy 
##         0.8611111         0.7916667         0.7916667

6.2 Final model (10 genes)

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## 
## Call:
## glm(formula = formula_str, family = binomial, data = data.frame(final_model_matrix))
## 
## Coefficients:
##                   Estimate Std. Error z value Pr(>|z|)
## (Intercept)     -6.098e+00  1.006e+05       0        1
## ENSG00000152894  1.064e+01  2.610e+05       0        1
## ENSG00000186073 -2.001e+01  1.661e+05       0        1
## ENSG00000112232  2.255e+01  1.773e+05       0        1
## ENSG00000173898 -3.164e+01  2.157e+05       0        1
## ENSG00000058091  2.196e+01  2.018e+05       0        1
## ENSG00000084072 -1.369e+00  1.491e+05       0        1
## ENSG00000166833 -3.067e+00  1.208e+05       0        1
## ENSG00000101057 -7.221e-01  2.505e+05       0        1
## ENSG00000271550  8.555e-01  2.179e+05       0        1
## ENSG00000134532  2.729e+00  1.245e+05       0        1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 3.3271e+01  on 23  degrees of freedom
## Residual deviance: 3.8444e-10  on 13  degrees of freedom
## AIC: 22
## 
## Number of Fisher Scoring iterations: 25

6.2.1 Check correlation between each feature

6.3 Check complete separation (perfect prediction)

## Implementation: ROI | Solver: lpsolve 
## Separation: TRUE 
## Existence of maximum likelihood estimates
##     (Intercept) ENSG00000152894 ENSG00000186073 ENSG00000112232 ENSG00000173898 
##            -Inf             Inf            -Inf             Inf            -Inf 
## ENSG00000058091 ENSG00000084072 ENSG00000166833 ENSG00000101057 ENSG00000271550 
##             Inf            -Inf             Inf            -Inf            -Inf 
## ENSG00000134532 
##            -Inf 
## 0: finite value, Inf: infinity, -Inf: -infinity

6.4 Method 1: Bayes

## bayesglm(formula = formula_str, family = binomial(link = "logit"), 
##     data = as.data.frame(final_model_matrix))
##                 coef.est coef.se
## (Intercept)     -0.12     0.82  
## ENSG00000152894  1.90     1.05  
## ENSG00000186073 -0.90     0.92  
## ENSG00000112232  0.98     0.75  
## ENSG00000173898 -0.73     0.85  
## ENSG00000058091  0.72     0.78  
## ENSG00000084072 -0.46     0.81  
## ENSG00000166833 -0.38     0.67  
## ENSG00000101057 -0.49     0.78  
## ENSG00000271550 -0.46     0.84  
## ENSG00000134532 -0.42     0.74  
## ---
## n = 24, k = 11
## residual deviance = 4.4, null deviance = 33.3 (difference = 28.9)
## 
## Call:  bayesglm(formula = formula_str, family = binomial(link = "logit"), 
##     data = as.data.frame(final_model_matrix), method = "detect_separation")
## 
## Coefficients:
##     (Intercept)  ENSG00000152894  ENSG00000186073  ENSG00000112232  
##         -0.1212           1.9042          -0.9044           0.9826  
## ENSG00000173898  ENSG00000058091  ENSG00000084072  ENSG00000166833  
##         -0.7303           0.7199          -0.4559          -0.3832  
## ENSG00000101057  ENSG00000271550  ENSG00000134532  
##         -0.4893          -0.4556          -0.4180  
## 
## Degrees of Freedom: 23 Total (i.e. Null);  13 Residual
## Null Deviance:       33.27 
## Residual Deviance: 4.371     AIC: 26.37

6.4.1 AUC:bayes

6.5 Method 2: Firth’s Bias-Reduced Logistic Regression

Firth’s bias reduction method, equivalent to penalization of the log-likelihood

## logistf(formula = formula_str, data = as.data.frame(final_model_matrix))
## 
## Model fitted by Penalized ML
## Coefficients:
##                        coef  se(coef) lower 0.95 upper 0.95      Chisq
## (Intercept)     -0.12162486 0.4778238  -1.951730   1.132856 0.04654081
## ENSG00000152894  0.80908839 0.9235939  -1.807387   5.566714 0.56450734
## ENSG00000186073 -0.38336802 0.8365246  -3.149846   1.940889 0.15791745
## ENSG00000112232  0.75311207 0.8088889  -1.108937   4.582622 0.68644923
## ENSG00000173898 -0.71874510 0.6776823  -4.860134   1.561141 0.77934305
## ENSG00000058091  0.93825921 0.7412681  -1.345513   4.437082 0.91025159
## ENSG00000084072 -0.15907838 0.7356271  -2.756363   1.884979 0.03434081
## ENSG00000166833 -0.41668886 0.4749537  -2.084143   1.162984 0.56991526
## ENSG00000101057 -0.64074898 0.7742647  -4.848279   1.731083 0.47489122
## ENSG00000271550 -0.19599018 0.9240849  -3.468708   2.428395 0.03374195
## ENSG00000134532 -0.09648449 0.6567023  -3.243360   1.871623 0.01625704
##                         p method
## (Intercept)     0.8291957      2
## ENSG00000152894 0.4524498      2
## ENSG00000186073 0.6910811      2
## ENSG00000112232 0.4073748      2
## ENSG00000173898 0.3773421      2
## ENSG00000058091 0.3400477      2
## ENSG00000084072 0.8529838      2
## ENSG00000166833 0.4502926      2
## ENSG00000101057 0.4907455      2
## ENSG00000271550 0.8542568      2
## ENSG00000134532 0.8985422      2
## 
## Method: 1-Wald, 2-Profile penalized log-likelihood, 3-None
## 
## Likelihood ratio test=16.91808 on 10 df, p=0.07619644, n=24
## Wald test = 11.02228 on 10 df, p = 0.3557845
## logistf(formula = formula_str, data = as.data.frame(final_model_matrix), 
##     method = "detect_separation")
## Model fitted by Penalized ML
## Confidence intervals and p-values by Profile Likelihood 
## 
## Coefficients:
##     (Intercept) ENSG00000152894 ENSG00000186073 ENSG00000112232 ENSG00000173898 
##     -0.12162486      0.80908839     -0.38336802      0.75311207     -0.71874510 
## ENSG00000058091 ENSG00000084072 ENSG00000166833 ENSG00000101057 ENSG00000271550 
##      0.93825921     -0.15907838     -0.41668886     -0.64074898     -0.19599018 
## ENSG00000134532 
##     -0.09648449 
## 
## Likelihood ratio test=16.91808 on 10 df, p=0.07619644, n=24
## [1] "AUC (test): 1"

## [1] "Accuracy (test): 1"

Check direction of each gene in two models, all the same

7 Final genes list (Total 10 genes)

Modules (size) Module correlation to treatment Genes selected by lasso
lightgreen (152 genes) Positive 8
darkred (63 genes) Negative 1
midnightblue (303 genes) Negative 1
ensembl_gene_id external_gene_name
1 ENSG00000058091 CDK14
2 ENSG00000084072 PPIE
3 ENSG00000101057 MYBL2
4 ENSG00000112232 KHDRBS2
5 ENSG00000134532 SOX5
6 ENSG00000152894 PTPRK
7 ENSG00000166833 NAV2
8 ENSG00000173898 SPTBN2
9 ENSG00000271550 BNIP3P11
10 ENSG00000186073 CDIN1

7.1 Heatmap (Pre-treatment vs Post-treatment)

7.2 Heatmap for Log-FoldChange for each patient

## Warning: Setting row names on a tibble is deprecated.
## Setting row names on a tibble is deprecated.

8 Pathway Analysis ORA

Reactome

.

KEGG

.